<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
</head>
<body>
<div id="app">
  <el-dropdown @command="handleCommand">
  <span class="el-dropdown-link"  >
    下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
  </span>
    <el-dropdown-menu slot="dropdown"  >
      <el-dropdown-item v-for="i in arr" :command="i.price" >{{i.title}}</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
<hr>
  <template>
    <el-select v-model="value"  placeholder="请选择">
      <el-option
              v-for="item in arr"
              :label="item.title"
              :value="item.price"
      >
      </el-option>
    </el-select>
    <h2>{{value}}</h2>
  </template>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
  let v = new Vue({
    el: '#app',
    data: function() {
      return {
        arr:[{title:"小米手机",price:3000},
          {title:"华为电视",price:4000},
          {title:"李宁球鞋",price:500},
          {title:"匹克跑步鞋",price:200},
        ],
        value:''
      }
    },
    methods:{
      handleCommand(command){
        v.$message("选择的商品"+command+"元");
      }

    }
  })
</script>
</html>